import 'package:flutter_test/flutter_test.dart';
import 'package:crydit_ume/crydit_ume.dart';
import 'package:crydit_ume/crydit_ume_platform_interface.dart';
import 'package:crydit_ume/crydit_ume_method_channel.dart';
import 'package:plugin_platform_interface/plugin_platform_interface.dart';

class MockCryditUmePlatform
    with MockPlatformInterfaceMixin
    implements CryditUmePlatform {

  @override
  Future<String?> getPlatformVersion() => Future.value('42');
}

void main() {
  final CryditUmePlatform initialPlatform = CryditUmePlatform.instance;

  test('$MethodChannelCryditUme is the default instance', () {
    expect(initialPlatform, isInstanceOf<MethodChannelCryditUme>());
  });

  test('getPlatformVersion', () async {
    CryditUme cryditUmePlugin = CryditUme();
    MockCryditUmePlatform fakePlatform = MockCryditUmePlatform();
    CryditUmePlatform.instance = fakePlatform;

    expect(await cryditUmePlugin.getPlatformVersion(), '42');
  });
}
